Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(file response): Support varying mtime semantics across different fsspec implementations #3902

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

provinzkraut
Copy link
Member

Change the implementation of responses.File to be able to handle most fsspec implementation's mtime equivalent.

This is necessary because fsspec implementations do not have a standardised way to retrieve an mtime equivalent; Some report an mtime, while some may use a different key (e.g. Last-Modified) and others do not report this value at all.

Fixes #3899

Copy link

codecov bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.35%. Comparing base (b30c7fc) to head (6336154).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3902   +/-   ##
=======================================
  Coverage   98.34%   98.35%           
=======================================
  Files         345      345           
  Lines       15589    15605   +16     
  Branches     1720     1725    +5     
=======================================
+ Hits        15331    15348   +17     
+ Misses        124      122    -2     
- Partials      134      135    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3902

Copy link
Member

@cofin cofin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this change. LGTM

@provinzkraut provinzkraut merged commit 87f8aa0 into main Dec 15, 2024
27 checks passed
@provinzkraut provinzkraut deleted the fix-3899 branch December 15, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: create_static_files_router with S3FS crashes due to unsupported fs info key (mtime)
2 participants